package com.cdtye.itps.cms.controller.pillar;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cdtye.common.webcore.web.AjaxJson;
import com.cdtye.itps.cms.dao.pillar.vo.JcwPillarVo;
import com.cdtye.itps.cms.service.pillar.JcwPillarService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 支柱 前端控制器
 * @author Jchen
 * @date 2021-07-08
 */
@Api(tags="支柱接口")
@RestController
@RequestMapping("/pillar")
public class JcwPillarController {
    @Autowired
    private JcwPillarService modelService;

    @ApiOperation("支柱列表查询")
    @GetMapping("/getList")
    public AjaxJson<List<Map<String,Object>>> getList(JcwPillarVo vo){
        List<Map<String,Object>> result = modelService.getList(vo);
        return AjaxJson.success(result);
    }

    @ApiOperation("支柱分页查询")
    @GetMapping("/pageList")
    public AjaxJson<List<Map<String,Object>>> pageList(JcwPillarVo vo){
        IPage<Map<String,Object>> result = modelService.listPage(vo);
        return AjaxJson.success(result);
    }
}
